/*
 * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
 * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
 */
package org.sbbs.base.tenant.entity;

import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.JoinColumn;
import jakarta.persistence.OneToOne;
import jakarta.persistence.Table;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.Comment;
import org.sbbs.base.jpa.entity.BaseEntity;

/**
 * <b>描述:</b><br/><br/>
 *
 * 租户数据源定义
 * <p>
 * <b>创建时间:</b> 2025年1月14日 12:39:51 <br/>
 * <b>作者:</b> Mr.FDC <fdc_messenger@126.com> <br/>
 *
 * <p>
 * <b>修改记录:</b><br/>
 * <ol>
 * <li>......</li>
 * </ol>
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Entity
@Table(name = "t_tenant_ds")
@Comment("租户数据源记录表")
public class TenantDS extends BaseEntity {

//    private String name;
    @Column(name = "username")
    @Comment("数据源用户名")
    private String userName;
    @Column(name = "password")
    @Comment("数据源密码")
    private String passWord;
    @Column(name = "jdbc_url",length = 500)
    @Comment("数据源jdbcurl")
    private String url;
    @Column(name = "driver_class")
    @Comment("数据源驱动")
    private String driverClass;
    @OneToOne
    @JoinColumn(name = "tenant_id", nullable = false)
    @Comment("租户ID")
    private Tenant tenant;
}
